/*
 *      Map.hpp
 *      
 *      Copyright 2009 Daniel Penney <bikedude880@paqsario.tastywaffle.org>
 *      
 *      This program is free software; you can redistribute it and/or modify
 *      it under the terms of the GNU General Public License as published by
 *      the Free Software Foundation; either version 2 of the License, or
 *      (at your option) any later version.
 *      
 *      This program is distributed in the hope that it will be useful,
 *      but WITHOUT ANY WARRANTY; without even the implied warranty of
 *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *      GNU General Public License for more details.
 *      
 *      You should have received a copy of the GNU General Public License
 *      along with this program; if not, write to the Free Software
 *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 *      MA 02110-1301, USA.
 */


#ifndef MAP_HPP
#define MAP_HPP

#include <cstdlib>
#include <vector>
using std::vector;
#include <ctime>

class Map
{
public:
	void initMap( const int, const int );

	void setMap( int, int, int );

	bool isMapBorder( int, int );
	int getMapVal( int, int );
	int getMapW() { return (int)(m_vMap.size() - 1); }
	int getMapH() { return (int)(m_vMap[0].size() - 1); }

	int getRandX() { return rand() % getMapW(); }
	int getRandY() { return rand() % getMapH(); }
private:
	vector< vector<int> > m_vMap;
};

#endif /* MAP_HPP */ 
